﻿using UnityEngine;
using System.Collections;

public class ShopLabel : MonoBehaviour {
    TRUCK_EVENT EventID;

	void Start(){

		string a = transform.parent.name;
		if (transform.parent.name == "ShopBtn(Clone)")
            EventID = transform.parent.GetComponent<ShopBtn>().EventID;
		else
            EventID = transform.parent.GetComponent<ShopWdw>().EventID;

        switch ((int)EventID)
        {
		case 0:
			GetComponent<UILabel>().text = "REINFORCE";
			break;

		case 1:
			GetComponent<UILabel>().text = "AMMO";
			break;

		case 2:
			GetComponent<UILabel>().text = "SUPPLY";
			break;

		case 3:
			GetComponent<UILabel>().text = "AMBULANCE";
			break;
		}

		GetComponent<UILabel>().depth =  transform.parent.GetComponent<UISprite>().depth+1;
	}

	void Update () {

	}
}
